#ifndef ATTENDANCEWIN_H
#define ATTENDANCEWIN_H

#include "QfaceObject.h"
#include <QMainWindow>
#include <QTcpSocket>
#include <QTcpServer>
#include <QSqlTableModel>
#include <QSqlRecord>
#include <QThread>
QT_BEGIN_NAMESPACE
namespace Ui {
class AttendanceWin;
}
QT_END_NAMESPACE

class AttendanceWin : public QMainWindow
{
    Q_OBJECT

public:
    AttendanceWin(QWidget *parent = nullptr);
    ~AttendanceWin();


protected slots:
    void accept_client();

    void read_data();

    void recv_faceid(int64_t faceid);

signals:
    void query(cv::Mat& image);


private:
    Ui::AttendanceWin *ui;

    QTcpServer m_server;
    QTcpSocket *m_socket;
    quint64 bsize=0;
    QfaceObject fobj;
    QSqlTableModel qmodel;
};
#endif // ATTENDANCEWIN_H
